﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
 using Webmedia.Wedding.Entities.Object.People;
namespace Webmedia.Wedding.Entities.Object.People
{
    public class PhongBan
    {
        [Display(Name = "Mã Phòng ban")]
        public int ID { get; set; }
        [Display(Name = "Tên Phòng ban")]
        public string TenPhongBan { get; set; }
        [Display(Name = "Địa chỉ")]
        public string DiaChi { get; set; }
        [Display(Name = "Số điện thoại")]
        public string SoDienThoai { get; set; }
        [Display(Name = "Email")]
        public string Email { get; set; }
        public  Nullable<int> NguoiQuanLyID { get; set; }
        [ForeignKey("NguoiQuanLyID")]
        [Display(Name = "Trưởng phòng ban")]
        public virtual NguoiDung NguoiQuanLy { get; set; }

         [InverseProperty("PhongBan")]
        public virtual ICollection<NguoiDung> Peoples { get; set; }

        [Display(Name = "Lương")]
        public double Luong { get; set; }

        [Display(Name = "Đơn vị tính lương")]
        public int DonViTinhLuongID { get; set; }
        [ForeignKey("DonViTinhLuongID")]
        public virtual DonViTinhLuong DonViTinhLuong { get; set; }

    }
}
